Angle measurement by imaging device